{# empty Twig template #}
{% extends'CNAMActimanBundle::layoutBody.html.twig' %}
{% block body %}

    {% block content %}
        <div class="col-lg-12">
            <h2>Liste des procédures</h2>
            <hr align="center" width="90%" size="5">
            <div class="col-lg-12">
                {% for service in list_service %}
                <div class="panel panel-primary">
                    <div class="panel-heading">
                        <h3 class="panel-title">
                            {{ service.nomService }}
                        </h3>
                    </div>
                    <div class="panel-body">            
                        <div class="table-responsive">
                            <table class="table table-bordered table-hover tablesorter">
                                <thead>
                                    <tr>
                                        <th width="24%">Procedure <i class="fa fa-sort"></i></th>
                                        <th width="24%">Responsable <i class="fa fa-sort"></i></th>
                                        <th width="20%">Date de Creation <i class="fa fa-sort"></i></th>
                                        <th width="20%">Date de dernière modification <i class="fa fa-sort"></i></th>
                                        <th width="12%"><center>Action <i class="fa fa-sort"></i></center></th>
                                    </tr>
                                </thead>
                                <tbody>
                                    {% for procedure in list_procedure %}
                                        {% if procedure.service == service %}
                                        <tr>
                                            <td>{{ procedure.nomProcedure }}</td>
                                            {% if procedure.user!= null %}
                                                <td>{{ procedure.user.nomUser }}</td>
                                            {% else %}
                                                <td>Pas de Responsable </td>
                                            {% endif %}  
                                            <td>{{ procedure.dateCreation|date("d/m/Y") }}</td>
                                            <td>{{ procedure.dateModification|date("d/m/Y") }}</td>
                                            <td><center><a href="{{ path('cnam_actiman_procedure_phase', {'idpro': procedure.id}) }}">Editer</a> / <a onClick="return confirm('Voulez-vous vraiment supprimer cette procédure ?');" href="{{ path('cnam_actiman_procedureDelete', {'idpro': procedure.id}) }}">Suprimer</a></center></td>
                                        </tr>
                                        {% endif %}
                                    {% endfor %}
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
                {% endfor %}
            </div>
        </div>
                                                                     
    {% endblock%}

{% endblock%}